
package com.jiuqi.ccp.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for comTablefilter.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="comTablefilterForm"
 */
public class ComTablefilterForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _ctfGuid = null;
   private java.lang.String _moduleCode = null;
   private java.lang.String _moduleName = null;
   private java.lang.String _tableName = null;
   private java.lang.String _tableChname = null;
   private java.lang.String _state = null;
   private java.lang.String _reserve1 = null;
   private java.lang.String _reserve2 = null;
   private java.lang.String _reserve3 = null;

   /**
    * Standard constructor.
    */
   public ComTablefilterForm() {
   }

   /**
    * Returns the ctfGuid
    *
    * @return the ctfGuid
    */
   public java.lang.String getCtfGuid() {
      return _ctfGuid;
   }

   /**
    * Sets the ctfGuid
    *
    * @param ctfGuid the new ctfGuid value
    */
   public void setCtfGuid(java.lang.String ctfGuid) {
      _ctfGuid = ctfGuid;
   }
   /**
    * Returns the moduleCode
    *
    * @return the moduleCode
    */
   public java.lang.String getModuleCode() {
      return _moduleCode;
   }

   /**
    * Sets the moduleCode
    *
    * @param moduleCode the new moduleCode value
    */
   public void setModuleCode(java.lang.String moduleCode) {
      _moduleCode = moduleCode;
   }
   /**
    * Returns the moduleName
    *
    * @return the moduleName
    */
   public java.lang.String getModuleName() {
      return _moduleName;
   }

   /**
    * Sets the moduleName
    *
    * @param moduleName the new moduleName value
    */
   public void setModuleName(java.lang.String moduleName) {
      _moduleName = moduleName;
   }
   /**
    * Returns the tableName
    *
    * @return the tableName
    */
   public java.lang.String getTableName() {
      return _tableName;
   }

   /**
    * Sets the tableName
    *
    * @param tableName the new tableName value
    */
   public void setTableName(java.lang.String tableName) {
      _tableName = tableName;
   }
   /**
    * Returns the tableChname
    *
    * @return the tableChname
    */
   public java.lang.String getTableChname() {
      return _tableChname;
   }

   /**
    * Sets the tableChname
    *
    * @param tableChname the new tableChname value
    */
   public void setTableChname(java.lang.String tableChname) {
      _tableChname = tableChname;
   }
   /**
    * Returns the state
    *
    * @return the state
    */
   public java.lang.String getState() {
      return _state;
   }

   /**
    * Sets the state
    *
    * @param state the new state value
    */
   public void setState(java.lang.String state) {
      _state = state;
   }
   /**
    * Returns the reserve1
    *
    * @return the reserve1
    */
   public java.lang.String getReserve1() {
      return _reserve1;
   }

   /**
    * Sets the reserve1
    *
    * @param reserve1 the new reserve1 value
    */
   public void setReserve1(java.lang.String reserve1) {
      _reserve1 = reserve1;
   }
   /**
    * Returns the reserve2
    *
    * @return the reserve2
    */
   public java.lang.String getReserve2() {
      return _reserve2;
   }

   /**
    * Sets the reserve2
    *
    * @param reserve2 the new reserve2 value
    */
   public void setReserve2(java.lang.String reserve2) {
      _reserve2 = reserve2;
   }
   /**
    * Returns the reserve3
    *
    * @return the reserve3
    */
   public java.lang.String getReserve3() {
      return _reserve3;
   }

   /**
    * Sets the reserve3
    *
    * @param reserve3 the new reserve3 value
    */
   public void setReserve3(java.lang.String reserve3) {
      _reserve3 = reserve3;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getCtfGuid() == null) {
         errors.add("ctfGuid", new ActionError("error.ctfGuid.required"));
      }
      // TODO test format/data
      return errors;
   }
}
